//package com.xiangxiangjd.config.springsecurity;
//
//import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
//import org.springframework.stereotype.Component;
//import org.springframework.web.filter.CharacterEncodingFilter;
//
//import javax.servlet.FilterRegistration;
//import javax.servlet.ServletContext;
//
//@Component
//public class HomeSecurityWebInitializer extends AbstractSecurityWebApplicationInitializer {
//
//    @Override
//    protected void beforeSpringSecurityFilterChain(ServletContext servletContext) {
//        FilterRegistration.Dynamic characterEncodingFilter = servletContext.addFilter("encodingFilter", new CharacterEncodingFilter());
//        characterEncodingFilter.setInitParameter("encoding", "UTF-8");
//        characterEncodingFilter.setInitParameter("forceEncoding", "true");
//        characterEncodingFilter.addMappingForUrlPatterns(null, false, "/*");
//    }
//}
